
clearAD();
clearOther();
clearCSS();
resetFontSize();
BookNameCenter();
function clearAD()
{
    let box_con = document.body.getElementsByClassName("box_con");
    console.log(box_con)
    if (box_con.length>0){
        let node = box_con[0];
        var divs = node.getElementsByTagName("div");
        for (let i = 0; i < divs.length; i++) {
            if( divs[i].hasAttribute("style")
                && divs[i].getAttribute("style")=="margin:0px auto;text-align:center;"){
                divs[i].remove();
            }
        }
    }
}
function clearOther()
{
    let className = ["footer","ywtop","ywtop_con","header","nav","con_top","bottem1","lm","bottem2"]

    for (let i = 0; i < className.length; i++) {
        let nodes = document.body.getElementsByClassName(className[i]);
        for (let j = 0; j < nodes.length; j++) {

            nodes[j].remove();
        }
    }
}
function clearCSS()
{
    var links = document.head.getElementsByTagName("link");
    for (let i = 0; i < links.length; i++) {
        if ( links[i].hasAttribute("type")
            && links[i].getAttribute("type")=="text/css"){
            links[i].remove();
        }
    }
}
function resetFontSize()
{
    let content = document.getElementById("content");
    console.log(content);
    content.setAttribute("style","font-size: 20pt;")
}
function BookNameCenter()
{
    let booknames = document.getElementsByClassName("bookname");
    for (let i = 0; i < booknames.length; i++) {
        booknames[i].setAttribute("style","text-align: center;font-size: 22pt;")
    }
}
